home *** CD-ROM | disk | FTP | other *** search
/ The Canadian & World Encyclopedia 1998 / The Canadian & World Encyclopedia 1998 - Disc 2.iso / mac / prime_CD / pb / PROFILE.DIR / 00681_Script_kf util processes < prev    next >
Text File  |  1997-07-29  |  808b  |  28 lines

  1. -- parse pmterms list
  2. global theList, rawData, pmcounter
  3. on parsePMlist
  4.   set pmcounter = 0
  5.   set rawData = the text of field 307 of castlib "internal"
  6.   set theList = [:]
  7.   repeat while length(rawData) > 0
  8.     parseApm
  9.   end repeat
  10.   put theList
  11. end
  12.  
  13. on parseApm
  14.   set theName = line 1 of rawData
  15.   delete line 1 of rawData
  16.   set theParty = line 1 of rawData
  17.   delete line 1 of rawData
  18.   set theTermTag = line 1 of rawData
  19.   delete line 1 of rawData
  20.   set theTermsList = []
  21.   repeat while line 1 of rawData <> EMPTY
  22.     append theTermsList, line 1 of rawData
  23.     delete line 1 of rawData
  24.   end repeat
  25.   delete line 1 of rawData
  26.   set pmcounter = pmcounter + 1
  27.   setaprop theList pmcounter, [#pmname: theName, #pmparty: theParty, #pmtermtag: thetermtag, #pmterms: theTermsList]
  28. end